package com.kitty.game.wawa.service;

import com.kitty.common.utils.SpringUtils;
import com.kitty.game.config.NPC;
import com.kitty.game.npc.message.RespNpcContent;
import com.kitty.game.role.model.Role;
import com.kitty.mina.message.MessagePusher;
import org.springframework.stereotype.Service;

@Service
public class WawaService {

    /**
     * 娃娃介绍
     * @param role
     */
    public void introduce(Role role){
        SpringUtils.getNpcService().openDlg(role,"ChildAllRuleDlg");
    }
    public void do_obtain(Role role, NPC npc){
        String msg = "想要得到娃娃得通过机缘考验，我这里有众多晶石，但#R只有一个#n是天地灵石，需要你根据直觉在战斗中#R捕捉#n其中一个，是否准备好了呢？[我准备好了/do_obtain_ready][离开]";
//        SpringUtils.getNpcService().openDlg(role,"ChildAllRuleDlg");

        RespNpcContent respNpcContent = new RespNpcContent();
        respNpcContent.setNpcName(npc.getName());
        respNpcContent.setNpcId(npc.getId());

        respNpcContent.setContent(msg);
        respNpcContent.setNpcIcon(npc.getIcon());
        MessagePusher.pushMessage(role, respNpcContent);
    }
}
